<div class="layui-side layui-bg-black">
	<div class="layui-side-scroll">
		<#include "/apps/business/workorders/include/left.html">
	</div>
</div>
<div class="layui-body">
	<div class="layui-side-scroll">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="site-h1" style="background-color:#FFFFFF;">
					流程列表<#if processList??>（${processList.totalCount}）</#if>
				</h1>
				<div class="row" style="padding:5px;">
					<div class="col-lg-12">
						<table class="layui-table" lay-skin="line">
						  <colgroup>
								<col width="20%">
								<col width="10%">
								<col width="1%">
								<col width="1%">
								<col width="1%">
								<col width="1%">
								<col>
						  </colgroup>
						  <thead>
								<tr>
									<th>业务流程标签</th>
									<th>业务流程名称</th>
									<th nowrap="nowrap">创建时间</th>
									<th nowrap="nowrap">状态</th>
									<th nowrap="nowrap">版本</th>
									<th nowrap="nowrap">操作</th>
								</tr>
							</thead>
							<tbody>
								<#if processList?? && processList.result??>
								<#list processList.result as process>
								<tr class="tdHasContorllor">
									<td>								
										<a href="javascript:void(0)" title="查看详情"><i class="itemicon ds-task"></i>${process.displayName!''}</a>							
									</td>
									<td>${process.name!''}</td>
									<td nowrap="nowrap">${process.createTime!''}</td>
									<td nowrap="nowrap"><#if process.state == 1><i class="layui-icon" style="color:#19a55d;">&#xe605;</i><#else>已卸载</#if></td>
									<td nowrap="nowrap">${process.version}</td>
									<td nowrap="nowrap">
										<#if process.state == 1>
										<a href="/apps/bpm/process/undeploy.html?id=${process.id!''}" data-toggle="tip" title="请确认是否卸载该流程？">
											<i class="layui-icon">&#xe640;</i>卸载</a>
										<#else>
											<a href="/apps/bpm/process/redeploy.html?id=${process.id!''}" data-toggle="tip" title="请确认是否装载该流程？">
												<i class="layui-icon">&#xe631;</i>装载
											</a>
											<a href="/apps/bpm/process/delete.html?id=${process.id!''}" title="删除流程" data-toggle="tip" title="删除流程会删除流程下的所有数据，请确认是否操作？">
												<i class="layui-icon" style="color:red;">&#x1006;</i>删除
											</a>
										</#if>
									</td>	
								</tr>
								</#list>
								</#if>
							</tbody>
						</table>
					</div> 	   
				</div>
				<div class="row" style="padding:5px;">
					<div class="col-lg-12" id="page" style="text-align:center;"></div>
				</div>
			</div>	
		</div>
	</div>
</div>

<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  
		  laypage.render({
				elem: 'page'
				,pages: <#if processList??>${processList.totalPages}<#else>0</#if> //总页数
				,curr:<#if processList??>${processList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/apps/bpm/index.html?p="+data.curr ;
					}
				}
		   });
		});
</script>